package b.DAO.Impl;

import b.DAO.UserDAO;
import b.domain.User;
import b.util.DruidUtils;
import org.springframework.jdbc.core.JdbcTemplate;

public class UserDAOImpl implements UserDAO {
    private JdbcTemplate template = new JdbcTemplate(DruidUtils.getDataSource());
    @Override
    public void insertUser(User user) {
        String sql = "insert into user values(null,?,?,?,?,?,?)";
        template.update(sql,user.getUsername(),user.getPassword(),user.getEmail(),user.getName(),user.getGender(),user.getBirthday());
    }

}
